/*
 * Visible snake objects.
 */

#include <stdlib.h>
#include "SnakeObject.h"

/**
 * \brief Create a snake object.
 * \param x X coordinate.
 * \param y Y coordinate.
 *
 * Creates an SnakeObject object at the given x, y coordinates.
 * The 'z' coordinate is assumed to be 0.
 */
SnakeObject::SnakeObject(int x, int y)
{
	this->x = x;
	this->y = y;
	this->z = 0;
}

/**
 * \brief Create a snake object.
 * \param x X coordinate.
 * \param y Y coordinate.
 * \param z Z coordinate.
 *
 * Creates an SnakeObject object at the given x, y, z coordinates.
 */
SnakeObject::SnakeObject(int x, int y, int z)
{
	this->x = x;
	this->y = y;
	this->z = z;
}

/**
 * \brief Return location on x-axis.
 * \return x coordinate.
 */
int& SnakeObject::X()
{
	return this->x;
}

/**
 * \brief Returns the location on the y-axis.
 * \return y coordinate.
 */
int& SnakeObject::Y()
{
	return this->y;
}

/**
 * \brief Returns the location on the z-axis.
 * \brief z coordinate
 */
int& SnakeObject::Z()
{
	return this->z;
}

/**
 * \brief Set x coordinate.
 * \param x New x.
 */
void SnakeObject::setX(int x)
{
	this->x = x;
}

/**
 * \brief Set y coordinate.
 * \param y New y.
 */
void SnakeObject::setY(int y)
{
	this->y = y;
}

/**
 * \brief Set z coordinate.
 * \param z New z.
 */
void SnakeObject::setZ(int z)
{
	this->z = z;
}
